﻿(function (module) {
    var ctrl = function ($log, $scope, $rootScope, $state, $window) {
        var currentStateName = $state.current.name;

        $log.debug('validationController.ctor:', $state.params);

        $scope.$on('$destroy', function () {
            $log.debug('validationController.$destroy');
        });

        $scope.testName = '';

        $scope.onSubmit = function () {
            $log.debug('onSubmit');

            $window.alert('form submitted!');
        };
    };
    ctrl.$inject = ['$log', '$scope', '$rootScope', '$state', '$window'];

    module.controller('validationController', ctrl);
}(angular.module('topics.controllers')));
